package cn.cs.client;

import cn.cs.config.CsConfiguration;
import cn.cs.fallback.AgentManageClientFallBack;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

@FeignClient(name = "cs-agent-provider", configuration = CsConfiguration.class, fallback = AgentManageClientFallBack.class)
public interface AgentManageClient {
    @RequestMapping(value = "/getAgentLevelBs", method = RequestMethod.POST)
    List<Map<String,Object>> getAgentLevelBs(@RequestBody Map<String, Object> param);
    @RequestMapping(value = "/insertLevelB", method = RequestMethod.POST)
    int insertLevelB(@RequestBody Map<String, Object> param);
    @RequestMapping(value = "/insertAgentArea", method = RequestMethod.POST)
    int insertAgentArea(@RequestBody Map<String, Object> areaMap);
    @RequestMapping(value = "/getAgentAreaByAgentId", method = RequestMethod.POST)
    Map<String,Object> getAgentAreaByAgentId(@RequestBody Map<String, Object> areaMap);
    @RequestMapping(value = "/updateAgentArea", method = RequestMethod.POST)
    int updateAgentArea(@RequestBody Map<String, Object> agentArea);
    @RequestMapping(value = "/deleteAgentUserById", method = RequestMethod.POST)
    int deleteAgentUserById(@RequestParam("id") String id);
}
